﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkBasket.Api;

namespace Workbasket.CoreExtensions.Controls
{
    [Export(typeof(IControl))]

    class Column : IControl
    {
        static private Dictionary<string, string> _Properties = new Dictionary<string, string>();
      
        public Column ()
	            {
                    _Properties.Add("width", "12");
	            }

        IDictionary<string, string> IControl.Properties
        {
            get
            {
                return _Properties;
            }
        }

        public string Description
        {
            get { return string.Empty; }
        }
        public string RenderBeginTag(IInstance InstanceData)
        {
            return "<div class='col-md-" + InstanceData.Properties["width"] + "'>";
        }

        public string RenderEndTag()
        {
            return "</div>";
        }

        public string ControlName
        {
            get { return "Column"; }
        }


        public string ToolBoxIcon
        {
            get { return "glyphicon glyphicon-th"; }
        }
    }
}
